a = [ 1,1,1,2,2,3,3]
from collections import Counter

b = dict(Counter(a))
print(b)
b = sorted(b.items(),key=lambda x:x[1],reverse=True)
print(b)